import { MockMethod } from "vite-plugin-mock";

const menuList = [
  {
    pageNum: 1,
    pageSize: 10,
    id: 18,
    menuCode: "testrouter",
    menuName: "测试路由",
    menuUrl: "",
    menuPath: "/testrouter",
    parentId: 1,
    icon: "el-icon-setting",
    menuOrder: 6,
    isLeaf: "0",
    resourceList: null,
    children: [
      {
        pageNum: 1,
        pageSize: 10,
        id: 19,
        menuCode: "router1",
        menuName: "测试路由1",
        menuUrl: "",
        menuPath: "/testrouter/router1",
        parentId: 18,
        icon: '""',
        menuOrder: 1,
        isLeaf: "1",
        resourceList: null,
        // resourceList: [
        //   {
        //     id: 12,
        //     resourceKey: "router1-edit",
        //     resourceName: "编辑",
        //     resourceType: "3",
        //     resourceGroupId: 11,
        //     resourceValue: "19",
        //     activeStatus: "Y",
        //     createUser: 1,
        //     createTime: "2021-09-03 07:52:32",
        //     lastUpdateUser: 1,
        //     lastUpdateTime: "2021-09-03 07:52:32"
        //   },
        //   {
        //     id: 13,
        //     resourceKey: "router1-open",
        //     resourceName: "详情",
        //     resourceType: "3",
        //     resourceGroupId: 11,
        //     resourceValue: "19",
        //     activeStatus: "Y",
        //     createUser: 1,
        //     createTime: "2021-09-03 07:52:32",
        //     lastUpdateUser: 1,
        //     lastUpdateTime: "2021-09-03 07:52:32"
        //   }
        // ],
        children: [
          {
            pageNum: 1,
            pageSize: 10,
            id: 21,
            menuCode: "router1-2",
            menuName: "测试路由1-1",
            menuUrl: "",
            menuPath: "/testrouter/router1/router",
            parentId: 19,
            icon: '""',
            menuOrder: 1,
            isLeaf: "1",
            resourceList: [
              {
                id: 12,
                resourceKey: "router1-1-edit",
                resourceName: "编辑1-1",
                resourceType: "3",
                resourceGroupId: 11,
                resourceValue: "21",
                activeStatus: "Y",
                createUser: 1,
                createTime: "2021-09-03 07:52:32",
                lastUpdateUser: 1,
                lastUpdateTime: "2021-09-03 07:52:32"
              },
              {
                id: 13,
                resourceKey: "router1-1-open",
                resourceName: "详情1-1",
                resourceType: "3",
                resourceGroupId: 11,
                resourceValue: "21",
                activeStatus: "Y",
                createUser: 1,
                createTime: "2021-09-03 07:52:32",
                lastUpdateUser: 1,
                lastUpdateTime: "2021-09-03 07:52:32"
              }
            ],
            activeStatus: "Y",
            createUser: 1,
            createTime: "2021-09-03 07:52:32",
            lastUpdateUser: 1,
            lastUpdateTime: "2021-09-03 07:52:32"
          }
        ]
      },
      {
        pageNum: 1,
        pageSize: 10,
        id: 20,
        menuCode: "router2",
        menuName: "测试路由2",
        menuUrl: "",
        menuPath: "/testrouter/router2",
        parentId: 18,
        icon: '""',
        menuOrder: 1,
        isLeaf: "1",
        resourceList: [
          {
            id: 14,
            resourceKey: "router2-edit",
            resourceName: "编辑",
            resourceType: "3",
            resourceGroupId: 12,
            resourceValue: "20",
            activeStatus: "Y",
            createUser: 1,
            createTime: "2021-09-03 07:54:44",
            lastUpdateUser: 1,
            lastUpdateTime: "2021-09-03 07:54:44"
          },
          {
            id: 15,
            resourceKey: "router2-ban",
            resourceName: "禁用",
            resourceType: "3",
            resourceGroupId: 12,
            resourceValue: "20",
            activeStatus: "Y",
            createUser: 1,
            createTime: "2021-09-03 07:54:44",
            lastUpdateUser: 1,
            lastUpdateTime: "2021-09-03 07:54:44"
          }
        ],
        children: [],
        activeStatus: "Y",
        createUser: 1,
        createTime: "2021-09-03 07:54:44",
        lastUpdateUser: 1,
        lastUpdateTime: "2021-09-03 07:54:44"
      }
    ],
    activeStatus: "Y",
    createUser: 1,
    createTime: "2021-09-03 07:26:27",
    lastUpdateUser: 1,
    lastUpdateTime: "2021-09-03 07:26:27"
  }
];

export default [
  {
    url: "/getMenuList",
    method: "get",
    response: () => {
      return {
        code: 200,
        data: menuList
      };
    }
  }
] as MockMethod[];
